<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="copyright" content="(C) Copyright 2005">
<meta name="DC.rights.owner" content="(C) Copyright 2005">
<meta name="DC.Type" content="concept">
<meta name="DC.Title" content="XML Catalog">
<meta name="abstract" content="This is an introduction of XML catalog.">
<meta name="description" content="This is an introduction of XML catalog.">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="xmlcatalog">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="commonltr.css">
<title>XML Catalog</title>
</head>
<body id="xmlcatalog"><a name="xmlcatalog"><!-- --></a>


<h1 class="topictitle1">XML Catalog</h1>


<div><p>This is an introduction of XML catalog. </p>

  <p><tt>An</tt> <em>XML catalog</em>, which can be physically composed of 
    several <em>catalog entry files</em>, is a logical structure that describes 
    mapping information. A <em>catalog entry file</em> is an xml file that 
    includes a group of <em>catalog entries</em>. </p>

  <p>A <em>catalog entry</em> can be used to locate a unified resource identifier 
    (URI) reference for a certain resource such as a dtd file. An external 
    entity's <em>public identifier</em> is used for mapping to the URI reference. 
    </p>

  <p>The URI of any system identifier can be ignored.</p>

  <div class="section"><h2 class="sectiontitle">Why use XML Catalog</h2>
    
    <p>XML Catalogs are used to make the XML setup more flexible and portable. 
      Using XML Catalogs, you can</p>

    <div class="p">
      <ul>
        <li>Map from the logical names such as the public identifiers. The 
          public identifier is safer and more stable to use to locate a 
          specific file than the system identifier. Even if the physical 
          location of the file changes, you only need to make revision 
          accordingly on the public identifier within the catalog.</li>

        <li>Establish a local cache mechanism to locate the files associated to 
          public identifiers or remote resources. With this mechanism the delay 
          that occurs when locating remote resources can be avoided. </li>

      </ul>

    </div>

  </div>

  <div class="section"><h2 class="sectiontitle">An XML Catalog Example</h2>
    
    <p>Here is an example of a XML Catalog file.</p>

    <p><strong>Example 1. An XML Catalog File:</strong> <em>catalog-dita.xml</em>.</p>

    <pre class="codeblock"> &lt;?xml version="1.0" ?&gt; &lt;catalog 
      xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public"&gt; 
      &lt;!-- Catalog for DITA --&gt; &lt;!-- DITA DTDs --&gt; &lt;group 
      xml:base="dtd"&gt; &lt;public publicId="-//IBM//DTD DITA Concept//EN" 
      uri="concept.dtd"/&gt; &lt;public publicId="-//IBM//ELEMENTS DITA 
      Concept//EN" uri="concept.mod"/&gt; ... &lt;!-- Demo/Experimental --&gt; 
      &lt;public publicId="-//IBM//DTD DITA Element Reference//EN" 
      uri="demo/elementref/elementref_shell.dtd"/&gt; &lt;public 
      publicId="-//IBM//ELEMENTS DITA Element Reference//EN" 
      uri="demo/elementref/elementref.mod"/&gt; &lt;public 
      publicId="-//IBM//DTD DITA FAQ//EN" uri="demo/faq/faq_shell.dtd"/&gt; 
      &lt;public publicId="-//IBM//ELEMENTS DITA FAQ//EN" 
      uri="demo/faq/faq.mod"/&gt; &lt;/catalog&gt;</pre>

    <div class="note"><span class="notetitle">Note:</span> 
      <ol>
        <li>The <tt>catalog</tt> element contains all other entries, and also 
          includes a catalog namespace identifier. The attribute of 
          <tt>prefer</tt> is set to <tt>public</tt>, which means that the 
          public identifiers are tried to resolve the catalog before using the 
          system identifiers.</li>

        <li>The group element is simply a wrapper element where the attributes 
          such as <tt>xml:base</tt> are set. These attributes apply to all 
          entries that are within the group content. The <tt>xml:base</tt> 
          attribute set the main pathname prefix that all URIs are located 
          relative to.</li>

      </ol>

    </div>

  </div>

  <div class="section"><h2 class="sectiontitle">Demo/Experimental section</h2>
    
    <p>The <strong>Demo/Experimental</strong> section in the <em>catalog-dita.xml</em> file 
      is the section to place demo or experimental dtd descriptions. New DITA 
      specialization features can be added in these descriptions. For example, 
      if you want to use the public identifier, <tt>-//IBM//DTD 
      SAMPLE//EN</tt>, to refer to the file with the pathname 
      <em>dtd/sample/mysample.dtd</em>, put the following catalog entry within 
      the <strong>Demo/Experimental</strong> section.</p>

    <div class="p">
      <pre class="codeblock">&lt;public publicId="-//IBM//DTD SAMPLE//EN" 
        uri="sample/mysample.dtd"/&gt;</pre>

    </div>

  </div>

</div>


</body>
</html>